#include "HashTable.h"

HashTable::HashTable()
{
}

HashTable::~HashTable()
{
}

void HashTable::insert(Node * node)
{
	int location = H(node->englishWord.at(0));

	hash[location].insert(node);
}

void HashTable::remove(std::string beRemoved)
{
	int location = H(beRemoved.at(0));

	hash[location].remove(beRemoved);
}

Node * HashTable::search(std::string beSearched)
{
	int location = H(beSearched.at(0));

	 return hash[location].search(beSearched);
}

int HashTable::H(char c)
{
	return c % 26;
}
